﻿using Magicodes.IE.Demo.IService;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Magicodes.IE.Demo.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class Export : ControllerBase
    {
        private readonly IExportServices _exportServices;

        public Export(IExportServices exportServices)
        {
            _exportServices = exportServices;
        }

        /// <summary>
        /// 泛型导出
        /// </summary>
        /// <returns></returns>
        [HttpGet,Route("ByList")]
        public ActionResult ByList()
        {
           return _exportServices.ByListAsync();
        }
    }
}
